package com.rc.saas.mini.service.rc;

import com.rc.saas.mini.mapper.rc.RcChannelLevelSettingMapper;
import com.rc.saas.mini.model.rc.RcChannelLevelSetting;
import com.rc.saas.mini.model.rc.RcChannelLevelSettingExample;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RcChannelLevelSettingServiceImpl implements RcChannelLevelSettingService {
    @Autowired
    private RcChannelLevelSettingMapper rcChannelLevelSettingMapper;

    @Override
    public RcChannelLevelSettingMapper getMapper() {
        return rcChannelLevelSettingMapper;
    }

    @Override
    public List<RcChannelLevelSetting> listByDefault() {
        RcChannelLevelSettingExample example = new RcChannelLevelSettingExample();
        example.createCriteria().andStatusEqualTo("0");
        example.setOrderByClause("sort");
        return rcChannelLevelSettingMapper.selectByExample(example);
    }

    @Override
    public RcChannelLevelSetting selectByUpdateCount(int size) {


        return rcChannelLevelSettingMapper.selectByUpdateCount(size);
    }
}
